package net.towee.server.test.managers;

import javax.inject.Inject;
import javax.servlet.http.HttpSession;

import net.towee.model.repo.AttachmentFactory;
import net.towee.model.repo.DocumentFactory;
import net.towee.server.authentication.EmailSender;
import net.towee.server.authentication.SessionAuthManager;
import net.towee.server.persistence.AccountStore;
import net.towee.server.persistence.AttachmentStore;
import net.towee.server.persistence.DiscussionStore;
import net.towee.server.persistence.DocumentStore;
import net.towee.server.persistence.GroupStore;
import net.towee.server.rpc.servlet.ToweeServiceServlet;

import com.mycila.event.Dispatcher;

public class ToweeTestService extends ToweeServiceServlet {
	protected final SessionAuthManager sessionManager;
	protected String acc;
	protected HttpSession fakeSession;
	
	@Inject
	public ToweeTestService(Dispatcher dispatcher, SessionAuthManager sessionManager,
			AccountStore accountStore, GroupStore groupStore,
			AttachmentFactory attachmentFactory, AttachmentStore attachmentStore,
			DiscussionStore discussionStore, DocumentStore documentStore,
			DocumentFactory documentFactory, EmailSender emailSender) {
		super(dispatcher, sessionManager, null, accountStore, groupStore, attachmentFactory,
				attachmentStore, discussionStore, documentStore, documentFactory, emailSender);
		
		this.sessionManager = sessionManager;
	}

	@Override
	protected String getUserId(){
		return acc;
	}
}
